home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
pdflib
/
p_port.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-09-16
|
2KB
|
82 lines
/* p_port.h
* Copyright (C) 1997-98 Thomas Merz. All rights reserved.
*
* PDFlib portability stuff
*/
#ifndef P_PORT_H
#define P_PORT_H
/* ---------------------- Windows -------------------*/
#ifdef _WIN32
#define WIN32
#define PDF_HAS_BOOL
#endif
#ifdef WIN32
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#endif
/* ---------------------- MS-DOS -------------------*/
#ifdef DOS
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#endif
/* ---------------------- Macintosh -------------------*/
#ifdef MAC
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#define PATHSEP ":"
#endif
/* ---------------------- NeXT -------------------*/
#ifdef NeXT
#endif
/* ---------------------- Defaults -------------------*/
/* Note: the defaults section is essentially the POSIX section
* since this is my main development platform
*/
#ifndef WRITEMODE
#define WRITEMODE "w"
#endif
#ifndef READMODE
#define READMODE "r"
#endif
#ifndef PATHSEP
#define PATHSEP "/"
#endif
/*
* Define PI if we don't have it already
* This is the case for Watcom 10.6, for example.
*/
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#ifdef NEED_GETOPT
extern int getopt(int nargc, char **nargv, char * ostr);
extern char *optarg;
extern int optind;
#endif
/* The dreaded boolean type is introduced in so many places.
* The PDF_HAS_BOOL define is a humble attempt to handle this situation.
*/
#ifndef PDF_HAS_BOOL
typedef int bool;
#endif
#endif /* P_PORT_H */